﻿using System;
using System.Windows.Controls;

namespace QuizzMe.Helpers
{
    /// <summary>
    /// Helper for page navigation
    /// </summary>
    public static class PageHelper
    {
        public static void NavigateTo(this Page page, Uri path)
        {
            if (page.NavigationService != null)
                page.NavigationService.Navigate(path);
        }

        public static void NavigateTo(this Page page, string path)
        {
            if (page.NavigationService != null)
                page.NavigationService.Navigate(new Uri(path, UriKind.Relative));
        }
    }
}
